#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStandardItem>
class QStandardItemModel;

namespace Ui {
class MainWindow;
}

namespace YReport {
    class TextReport;
}

class tableItem : public QStandardItem
{
public:
    tableItem();
    tableItem(const QString &text):QStandardItem(text){}
    ~tableItem(){qDebug("2222"); }

};

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();


private slots:
    void on_actExit_triggered();

    void on_actPerview_triggered();

    void on_tableView_customContextMenuRequested(const QPoint &);

    void on_actDelete_triggered();

    void on_actAdd_triggered();

    void documentModified();

    void exportPdf();

    bool askSave();

protected:
    void closeEvent(QCloseEvent *event);

private:
    Ui::MainWindow *ui;
    YReport::TextReport *textReport;
    QStandardItemModel *model;
    QMenu *menu;
    QString currentfile_;
    bool html_;
};

#endif // MAINWINDOW_H
